<?php
include 'common/header.html';
include 'common/left.html';
include 'common/autoload.php';
include("common/page.php");
$did = $_SESSION['memberID'];

if(!in_array($_SESSION['dtype'],array(0,2,9,6))){
	exit("没有访问权限");
}
// 如果是供应商获取该供应商供应产品
if(0==$_SESSION['sdtype']) $condition='AND apply_did='.$_SESSION['sid'];
$sql="SELECT title,salerid,getPY(title,1) as py1,getPY(title,2) as py2,".
    "getPY(title,3) as py3 FROM uu_land WHERE status<>3 $condition"
    ." ORDER BY py1 ASC";
$GLOBALS['le']->query($sql);
$r = array();
while($row=$GLOBALS['le']->fetch_assoc()){
	$r[]=$row;
}
?>
<style>
.tishi{color:red;margin-top:5px;}
.wenxin{color:black;font-size:12px;}
.iWrap{width:100%;margin-top:10px;padding:10px 0;<!-- background:#FFF8EE; --><!-- border:1px solid #FFD5A1; -->}
.iTable{width:100%;font-size: 14px;}
.iTable .auto{white-space:nowrap;word-break:keep-all;width:10px;}
.iTable td{padding:6px 10px;}
.iShow{padding:6px 10px;font-size: 14px;}
select#salerid {font-size: 14px;background-color: #f5f5f5;width:216px;border: 1px solid #e5e5e5;height: 32px;}
input#cert {background-color: #f5f5f5;border: 1px solid #e5e5e5;height: 30px;width: 214px; padding: 0 5px;}
input#cert:focus{border-color: #0797D9; background: #FFFFFF; color: #0797D9;}
input#getResult {width: 100px;height: 30px;float: left;margin-right: 3px;line-height: 30px;
border: 0;background-color: #00a0e9;color: #FFF;cursor: pointer;}
</style>
<script src="js/select2.js"></script>
<link rel="stylesheet" type="text/css" href="css/select2.css">
<div class="r_content">
	<h3 class="mc_title">
	<span class="mctit_1 notcur"><a href="terchange.html"><span class="mctit_2">撤改审核</span></a></span>
	<span class="mctit_1 notcur"><a href="taobaolist.html"><span class="mctit_2">淘宝补单</span></a></span>
	<span class="mctit_1 "><a href="terminal_chk.html"><span class="mctit_2 active">反查订单</span></a></span>
	</h3>
	<div class="iWrap">
		<table cellspacing="0" cellpadding="0" border="0" class="iTable">
		<tr>
			<td class="auto">景区：</td>
			<td colspan="2">
			<select name="prodname" id="salerid">
			<option value="" >---------请选择--------</option>
			<?foreach($r as $v):?>
			<option value="<?=$v['salerid']?>" ><?=$v['py1'].$v['py2'].$v['py3']?>-<?=mb_substr($v['title'],0,30,'utf8')?></option>
			<?endforeach;?>
			</select>
			</td>
		</tr>
		<tr>
			<td class="auto">凭证码：</td>
			<td class="auto"><input type="text" name="code" id="cert" onblur="if (isNaN(this.value)){alert('请输入六位数凭证码！');this.focus();this.value=''}"/></td>
			<td><input type="submit" value="获取订单" id="getResult" onclick="getOrd()"/></td>
		</tr>
		</table>
	</div>
	<div class="iShow">订单号：<span id="ordernum"></span></div>
</div>
<script>
	$("#salerid").select2({
		placeholder: "Select a State",
		allowClear: true
	});
</script>
<script>
(function(){
	
	$("#getResult").click(function(){
		return false;
	});

})();
function getOrd(){
	var txt=$.ajax({url:"code2Order.php",data:{salerid:$('#salerid').val(),cert:$('#cert').val()},async:false}).responseText;
	$('#ordernum').html(txt);
}
</script>

    <link rel="stylesheet" type="text/css" href="http://www.12301.cc/css/common/reset_style.css"/>
    <link rel="stylesheet" href="http://www.12301.cc/tpl/ui/common/ui_common.css"/>
    <link rel="stylesheet" href="http://www.12301.cc/css/new/code2Order.css"/>

<?include 'common/footer.html';?>